﻿using dz.u9.jky.schema.Attrib;
using dz.u9.jky.schema.Common;
using System;
using System.Collections.Generic;

namespace dz.u9.jky.schema.SM
{
    public class DzRMA
    {
        [DzAlias("SaleDeptDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]
        public string SaleDept { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        [DzAlias("DocumentTypeDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]

        public string DocumentType { get; set; }

        /// <summary>
        /// 核算组织
        /// </summary>
        [DzAlias("AccountOrgDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]

        public string AccountOrg { get; set; }

        /// <summary>
        /// 核算币种
        /// </summary>

        [DzAlias("ACDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]

        public string AC { get; set; }

        [DzAlias("TCDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]

        public string TC { get; set; }

        public DateTime BusinessDate { get; set; }

        /// <summary>
        /// 组织
        /// </summary>
        [DzAlias("OrgDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]

        public string Org { get; set; }

        /// <summary>
        /// 弹性域
        /// </summary>
        [DzComplexObject("UFIDA.U9.Base.FlexField.DescFlexField.DescFlexSegments,UFIDA.U9.Base.BaseBE")]
        public DescFlexField DescFlexField { get; set; }

        [DzEnum("UFIDA.U9.CBO.SCM.Enums.RMRProcessTypeEnum,UFIDA.U9.CBO.SCMBE")]
        public int RMAType { get; set; } = 0;


        [DzAlias("CustomerDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]

        public string Customer { get; set; }

        [DzList("UFIDA.U9.ISV.SM.RMALineDTO,UFIDA.U9.ISV.SM.SDIndustryChainSV")]
        public List<DzRMALine> RMALines { get; set; }

        [DzList("UFIDA.U9.ISV.SM.RMAAddresseDTO,UFIDA.U9.ISV.SM.SDIndustryChainSV")]
        public List<DzRMAAddresses> RMAAddresses { get; set; }

        
        [DzList("UFIDA.U9.ISV.SM.RMAContactDTO,UFIDA.U9.ISV.SM.SDIndustryChainSV")]
        public List<DzRMAContact> RMAContacts { get; set; }

        
        [DzList("UFIDA.U9.ISV.SM.RMAFeeDTO,UFIDA.U9.ISV.SM.SDIndustryChainSV")]
        public List<DzRMAFee> RMAFees { get; set; }


    }
    public class DzRMALine
    {
        [DzAlias("WarehouseDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]
        public string Warehouse { get; set; }
        /// <summary>
        /// 弹性域
        /// </summary>
        [DzComplexObject("UFIDA.U9.Base.FlexField.DescFlexField.DescFlexSegments,UFIDA.U9.Base.BaseBE")]
        public DescFlexField DescFlexField { get; set; }

        [DzAlias("ItemInfoDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]

        public string ItemInfo { get; set; }

        /// <summary>
        /// 申请数量
        /// </summary>
        public decimal ApplyQtyTU1 { get; set;   }



        /// <summary>
        /// 核定数量
        /// </summary>
        public decimal RtnQtyTU1 { get; set; }

        /// <summary>
        /// 计价单位
        /// </summary>
        [DzAlias("PUDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]
        public string PU { get; set; }

        /// <summary>
        /// 计价单位
        /// </summary>
        [DzAlias("TaxScheduleDTO")]
        [DzSimpleObject("UFIDA.U9.Base.DTOs.IDCodeNameDTO,UFIDA.U9.Base.BaseBE")]
        public string TaxSchedule { get; set; }
        

        /// <summary>
        /// 定价
        /// </summary>
        public decimal OrderPrice { get; set; }

        /// <summary>
        /// 申请价格
        /// </summary>
        public decimal ApplyPrice { get; set; }

        /// <summary>
        /// 申请金额
        /// </summary>
        public decimal ApplyMoneyTC { get; set; }

        /// <summary>
        /// 申请未税额
        /// </summary>
        public decimal ApplyNetMoneyTC { get; set; }

        /// <summary>
        /// 税额
        /// </summary>
        public decimal TotalTaxFC { get; set; }

        public decimal TaxRate { get; set; }

        public decimal RtnMoneyTC { get; set; }       

        public decimal RtnMoneyACNet { get; set; }
        public decimal RtnMoneyTCNet { get; set; }

        public decimal RtnMoneyFCNet { get; set; }

        [DzList("UFIDA.U9.ISV.SM.RMAAddresseDTO,UFIDA.U9.ISV.SM.SDIndustryChainSV")]
        public List<DzRMAAddresses> RMAAddresses { get; set; }


        [DzList("UFIDA.U9.ISV.SM.RMAContactDTO,UFIDA.U9.ISV.SM.SDIndustryChainSV")]
        public List<DzRMAContact> RMAContacts { get; set; }
    }

    public class DzRMAAddresses
    { }

    public class DzRMAContact { }

    public class DzRMAFee { }
}
